﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace Virus
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            try
            {
                //Webgame.Config.GameConfig.BasePath = Server.MapPath(".");
                Common.SQLiteHelper.ConnectionString = System.Configuration.ConfigurationManager.AppSettings["dbFile"];
            }
            catch (Exception ex)
            {
                string fileName = Server.MapPath("xx.log");
                System.IO.File.AppendAllText(fileName, ex.ToString());
            }
        }

        protected void Application_End(object sender, EventArgs e)
        {
            Game.Virus v = Game.Virus.GetVirus(0);
            v.Save();
        }
    }
}